package com.mall.product.service;

import com.mall.common.page.PageData;
import com.mall.common.service.CrudService;
import com.mall.product.dto.AttrDTO;
import com.mall.product.entity.AttrEntity;
import com.mall.product.vo.AttrGroupRelationVo;
import com.mall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author xjc xjc@163.com
 * @since 1.0.0 2022-07-17
 */
public interface AttrService extends CrudService<AttrEntity, AttrDTO> {

    void saveAttrDto(AttrDTO dto);

    PageData<AttrVo> pageByParam(Map<String, Object> params, Long catelogId);

    AttrVo getAllDataInfo(Long id);

    void updateAllInfo(AttrDTO dto);

    List<AttrEntity> ListByIds(List<Long> ids);

    void deleteRelation(AttrGroupRelationVo[] relationVos);

    PageData<AttrDTO> selectWithOutInCollection(Map<String, Object> params,Long catelogId, List<Long> attrIds);

    List<AttrDTO> ListAttrByCatelogIdAndAttrType(Long catelogId,int type);

    List<Long> ListSearchAttrsByIds(List<Long> attrIds);
}